package com.atguigu.spzx.product.mapper;

import com.atguigu.spzx.model.dto.h5.ProductSkuDto;
import com.atguigu.spzx.model.entity.product.ProductSku;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: Shylo Sun
 * @Project: spzx-parent
 * @Date: 2023/11/20 11:11
 */
@Mapper
public interface ProductSkuMapper {

    // 根据销量排序，获取前20条记录
    List<ProductSku> findProductSkuBySale();

    List<ProductSku> findByPage(ProductSkuDto productSkuDto);

    // 根据skuId获取ProductSku
    ProductSku getById(Long id);

    // 根据商品id获取ProductSku列表
    List<ProductSku> findByProductId(Long productId);

}